from lxml import etree
from urllib import parse
import requests

base_url ="http://oa.kedacom.com"

#response = requests.get(base_url)

#print(response.text)
#with open('oa_login1.html','w') as file_object:
#    file_object.write(response.text)

# 登录

log_url = "https://sso.kedacom.com:8443/CasServer/login?service=https%3A%2F%2Foa.kedacom.com%2Fportal%2Fj_spring_cas_security_check"

data = {
    "username":"wuqiang@kedacom.com",
    "password":"Wu415439280",
    "loginTicket":"loginTicket_-12836108-deKZNtuf5XIBkGUcCLi5lsniSklJOk",
    "execution":"e1s1",
    "_eventId":"submit",
    "loginType":"web",
    "kdmoaAccount":"nice"
}

response = requests.post(log_url,data=data)

print(response.status_code)


